<template>


姓名：<input type="text" v-model="name">

日期：<input type="date" v-model="ctime">

<button @click="Show">搜索</button>



<table>

    <thead>
            <tr>    

                <th>id</th>
                <th>名称</th>
                <th>创建时间</th>
            </tr>

    </thead>
    <tbody>
        <tr v-for="item in aa">    

            <th>{{ item.did }}</th>
            <th>{{ item.dname }}</th>
            <th>{{ item.ctime.substring(0,10) }}</th>
                </tr>

        
    </tbody>
</table>




</template>


<script setup lang="ts">
import axios from 'axios';
import {onMounted, ref} from 'vue';


onMounted(()=>{

    Show();
})
const aa= ref([{

    "did": 1,
      "dname": "青铜",
      "ctime": "2024-12-18T09:15:10.4162339"
}])
    
const s= 1
const m =ref(3)

const name=ref('')
const ctime =ref('')

const  Show=()=>{

    axios.get('https://localhost:7188/api/Dengji/ShowD',{params:{
        
            Name:name.value,
            Ctime:ctime.value


    }}).then(res=>{

      
        aa.value=res.data.data;
    })

}


</script>